import { StoreApi, create,UseBoundStore } from "zustand";


type BearStore = {
    count: number;
    add: () => void;
    setCount: (num: number) => void;
}
export const useBearStore:UseBoundStore<StoreApi<BearStore>>  = create((set) => ({
  count: 1,
  add: () => set((state) => ({ count: state.count + 1 })),
  setCount: (num) => set({ count: num }),
}));

type FamilyInfo ={
  id?:string,
  name?:string,
  description?:string,
}

type FamilyStore = {
  family:FamilyInfo,
  setFamily: (family:FamilyInfo) => void;
}
export const useFamilyStore:UseBoundStore<StoreApi<FamilyStore>>  = create((set) => ({
  family:{},
  setFamily: (family) => set({family}),
}));


